﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ihongma.Web.UI;
using System.Data;
using System.Text;
namespace ihongma.Web.aspx.html5hongma
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BLL.article ACR=new BLL.article();
            BLL.ajax ACRs = new BLL.ajax();
            StringBuilder sb = new StringBuilder();
            foreach(DataRow i in ACR.GetList("").Tables[0].Rows)
            {
               // sb.AppendFormat("<Item Title=\"{0}\" Url=\"{1}\" Content=\"{2}\" Time=\"{3}\"/>", i["title"], "dsaf", i["zhaiyao"],DateTime.Now);
              
             SearchHelper.GetInstance().AddArticle(int.Parse(i["id"].ToString()),InfoType.news);

            }
            foreach (DataRow i in ACRs.GetList("").Tables[0].Rows)
            {
                // sb.AppendFormat("<Item Title=\"{0}\" Url=\"{1}\" Content=\"{2}\" Time=\"{3}\"/>", i["title"], "dsaf", i["zhaiyao"],DateTime.Now);

                SearchHelper.GetInstance().AddArticle(int.Parse(i["id"].ToString()), InfoType.ajax);

            }
            //Response.Write(sb.ToString());
            Response.Write("ok");
        }
    }
}